<template>
  <div>
    <p>展示页面</p>
    <p v-for="n in news" :key="n.id">
      {{ n.name }}
    </p>
  </div>
</template>
    
    <script>
import Axios from "axios";

export default {
  name: "NewsShowView",
  data() {
    return {
      news: [],
    };
  },
  mounted() {
    Axios.get("http://127.0.0.1:8000/app/zhans/")
      .then((result) => {
        console.log(result);
        this.news = result.data;
      })
      .catch((err) => {
        console.log(err);
      });
  },
};
</script>
    
    <style>
</style>